package com.gamefx.engine1.managers
{
	public class TimerManager
	{
		private static var _impl:ITimerManager
		
		private static function get impl():ITimerManager
		{
			if (_impl == null)
			{
				_impl = TimerManagerImpl.getInstance();
			}
			
			return _impl;
		}
		
		public static function setTimeout(closure:Function, delay:Number, ... arguments):uint
		{
			return impl.setTimeout(closure, delay, arguments);
		}
		
		public function clearTimeout(id:uint):void
		{
			impl.clearTimeout(id);
		}
		
		public function setInterval(closure:Function, delay:Number, ... arguments):uint
		{
			return impl.setInterval(closure, delay, arguments);
		}
		
		public function clearInterval(id:uint):void
		{
			impl.clearInterval(id);
		}
	}
}